package com.sf.sms.software.action;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.sf.sms.software.entity.dto.SoftwareCategoryDTO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.sf.sms.software.service.SoftwareCategoryService;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Controller
@RequestMapping("/softwarecategory")
public class SoftwareCategoryAction {

	@Autowired
	private SoftwareCategoryService scService;

	@RequestMapping(value = "/saveSoftwareCategory", method = RequestMethod.POST)
	public String saveSoftwareCategory(HttpServletRequest request, HttpServletResponse response) throws Exception {
		return null;
	}

	@ResponseBody
	@RequestMapping("/get")
	public List<SoftwareCategoryDTO> getSoftwareCategory() {
		return scService.getAllSoftwareCategory();
	}

}


